﻿using System;
using System.Collections.Generic;

using SBPweb.Services.Base;
using SBPweb.Services.Crawlers.Base;

namespace SBPweb.Services.Crawlers.IWIW
{

    public class Client : ParsingClientBase
    {

        #region Constructor logic

        public Client(Uri baseUri)
            : base(baseUri)
        {
        }

        #endregion

        #region Property accessors

        #endregion

        #region Methods

        public ServiceMethodResult SignIn(string userName, string password)
        {
            ServiceMethodResult smr = new ServiceMethodResult(ServiceResultCode.CreateByCode(ServiceResultCode.Unknown), null);
            Uri uri = new Uri(baseUri + string.Format("/pages/user/login.jsp?method=Login&email={0}&password={1}", userName, password));

//            Dictionary<string, string> values = new Dictionary<string, string>();
//            values.Add("email", userName);
//            values.Add("password", password);

            string ret = this.ParseRequest(uri, "mainForm");

            return smr;
        }

        public void SignOut()
        {
        }

        #endregion

    }

}
